Optimal. Leaf size=262 \[ \frac {(A-i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(i a+b) (c-i d)^{3/2} f}+\frac {(i A-B-i C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(a+i b) (c+i d)^{3/2} f}-\frac {2 \sqrt {b} \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\left (a^2+b^2\right ) (b c-a d)^{3/2} f}+\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.87, antiderivative size = 262, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 7, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {3730, 3734,
3620, 3618, 65, 214, 3715} \begin {gather*} -\frac {2 \sqrt {b} \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{f \left (a^2+b^2\right ) (b c-a d)^{3/2}}+\frac {2 \left (A d^2-B c d+c^2 C\right )}{f \left (c^2+d^2\right ) (b c-a d) \sqrt {c+d \tan (e+f x)}}+\frac {(A-i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f (b+i a) (c-i d)^{3/2}}+\frac {(i A-B-i C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f (a+i b) (c+i d)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 214
Rule 3618
Rule 3620
Rule 3715
Rule 3730
Rule 3734
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) (c+d \tan (e+f x))^{3/2}} \, dx &=\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}}+\frac {2 \int \frac {\frac {1}{2} \left (-a A c d+a d (c C-B d)+A b \left (c^2+d^2\right )\right )+\frac {1}{2} (b c-a d) (B c-(A-C) d) \tan (e+f x)+\frac {1}{2} b \left (c^2 C-B c d+A d^2\right ) \tan ^2(e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx}{(b c-a d) \left (c^2+d^2\right )}\\ &=\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}}+\frac {\left (b \left (A b^2-a (b B-a C)\right )\right ) \int \frac {1+\tan ^2(e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx}{\left (a^2+b^2\right ) (b c-a d)}+\frac {2 \int \frac {\frac {1}{2} (b c-a d) (b B c-b (A-C) d+a (A c-c C+B d))+\frac {1}{2} (b c-a d) (a B c+b c C-b B d+a C d-A (b c+a d)) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{\left (a^2+b^2\right ) (b c-a d) \left (c^2+d^2\right )}\\ &=\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}}+\frac {(A-i B-C) \int \frac {1+i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 (a-i b) (c-i d)}+\frac {(A+i B-C) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 (a+i b) (c+i d)}+\frac {\left (b \left (A b^2-a (b B-a C)\right )\right ) \text {Subst}\left (\int \frac {1}{(a+b x) \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right ) (b c-a d) f}\\ &=\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}}+\frac {(i A+B-i C) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c-i d x}} \, dx,x,i \tan (e+f x)\right )}{2 (a-i b) (c-i d) f}-\frac {(i (A+i B-C)) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{2 (a+i b) (c+i d) f}+\frac {\left (2 b \left (A b^2-a (b B-a C)\right )\right ) \text {Subst}\left (\int \frac {1}{a-\frac {b c}{d}+\frac {b x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{\left (a^2+b^2\right ) d (b c-a d) f}\\ &=-\frac {2 \sqrt {b} \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\left (a^2+b^2\right ) (b c-a d)^{3/2} f}+\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}}-\frac {(A-i B-C) \text {Subst}\left (\int \frac {1}{-1-\frac {i c}{d}+\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{(a-i b) (c-i d) d f}-\frac {(A+i B-C) \text {Subst}\left (\int \frac {1}{-1+\frac {i c}{d}-\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{(a+i b) (c+i d) d f}\\ &=-\frac {(i A+B-i C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(a-i b) (c-i d)^{3/2} f}-\frac {(A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b) (c+i d)^{3/2} f}-\frac {2 \sqrt {b} \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\left (a^2+b^2\right ) (b c-a d)^{3/2} f}+\frac {2 \left (c^2 C-B c d+A d^2\right )}{(b c-a d) \left (c^2+d^2\right ) f \sqrt {c+d \tan (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.28, size = 296, normalized size = 1.13 \begin {gather*} \frac {-\frac {i \left (\frac {(a+i b) (A-i B-C) (c+i d) (-b c+a d) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{\sqrt {c-i d}}+\frac {(a-i b) (A+i B-C) (c-i d) (b c-a d) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{\sqrt {c+i d}}\right )}{a^2+b^2}+\frac {2 \sqrt {b} \left (A b^2+a (-b B+a C)\right ) \left (c^2+d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\left (a^2+b^2\right ) \sqrt {b c-a d}}-\frac {2 \left (c^2 C-B c d+A d^2\right )}{\sqrt {c+d \tan (e+f x)}}}{(-b c+a d) \left (c^2+d^2\right ) f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(6343\) vs.
\(2(229)=458\).
time = 0.63, size = 6344, normalized size = 24.21
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(6344\) |
default | \(\text {Expression too large to display}\) | \(6344\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B \tan {\left (e + f x \right )} + C \tan ^{2}{\left (e + f x \right )}}{\left (a + b \tan {\left (e + f x \right )}\right ) \left (c + d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________